#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
/*
 * Copyright © 2014, Finium Sdn Bhd, All Rights Reserved
 * 
 * ChangePasswordDTO.java
 * Modification History
 * *************************************************************
 * Date				Author						Comment
 * Jan 02, 2013		Venkaiah Chowdary Koneru	Created
 * *************************************************************
 */
package ${package}.dto;

import static ${package}.SerializationConstants.CHANGE_PASSWORD;

import java.io.Serializable;

import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

import ${package}.AppConstants;
import ${package}.support.validation.FieldMatch;
import ${package}.support.validation.SecondGroup;

import org.hibernate.validator.constraints.NotEmpty;

/**
 * Change Password DTO.
 * 
 * @author Venkaiah Chowdary Koneru
 */
@XmlRootElement(name = CHANGE_PASSWORD)
@FieldMatch.List({ @FieldMatch(first = "newpassword",
        second = "confirmPassword",
        message = "changepassword.confirmpasswd.match",
        groups = SecondGroup.class) })
public class ChangePasswordDTO implements Serializable
{
    private static final long serialVersionUID = 1L;

    @NotEmpty(message = "changepassword.currentpasswd.null")
    @Size(min = AppConstants.MIN_3, max = AppConstants.MAX_80,
            message = "changepassword.currentpasswd.length",
            groups = SecondGroup.class)
    private String password;

    @NotEmpty(message = "changepassword.newpasswd.null")
    @Size(min = AppConstants.MIN_3, max = AppConstants.MAX_80,
            message = "changepassword.newpasswd.length",
            groups = SecondGroup.class)
    private String newpassword;

    @NotEmpty(message = "changepassword.confirmpasswd.null")
    @Size(min = AppConstants.MIN_3, max = AppConstants.MAX_80,
            message = "changepassword.confirmpasswd.length",
            groups = SecondGroup.class)
    private String confirmPassword;

    /**
     * @return the password
     */
    public String getPassword()
    {
        return password;
    }

    /**
     * @param password
     *            the password to set
     */
    public void setPassword(String password)
    {
        this.password = password;
    }

    /**
     * @return the newpassword
     */
    public String getNewpassword()
    {
        return newpassword;
    }

    /**
     * @param newpassword
     *            the newpassword to set
     */
    public void setNewpassword(String newpassword)
    {
        this.newpassword = newpassword;
    }

    /**
     * @return the confirmPassword
     */
    public String getConfirmPassword()
    {
        return confirmPassword;
    }

    /**
     * @param confirmPassword
     *            the confirmPassword to set
     */
    public void setConfirmPassword(String confirmPassword)
    {
        this.confirmPassword = confirmPassword;
    }
}
